# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-huawei-kiwi
pkgdesc="Huawei Honor 5X / GR5 (2016)"
pkgver=4
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916 soc-qcom-msm8939"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

nonfree_firmware() {
	pkgdesc="Modem/GPU/WiFi/BT/Video firmware"
	depends="firmware-qcom-adreno-a420 msm-firmware-loader
		 firmware-huawei-kiwi-venus firmware-huawei-kiwi-wcnss-nv"
	mkdir "$subpkgdir"
}

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

sha512sums="
75a1f85387c92c5a8673af3571ede85d68584ee97ccdc269468d16f34963c9c54e44a6981fa878e13aaaff57e8639be4371f43a3ad288ba76fa0ac47df7d77d4  deviceinfo
96b41eb6b39f8c8bcb6c99ab6b5729ec33d6bc394b2230ed168cf19cba8f86ebae3340b0ef9e15a3a6ee202895cd81f4d8812e5c81c4cc6d087ca9e239023993  modules-initfs
"
